<template>
  <div>
    <van-field
      v-model="name"
      name="分类名"
      label="分类"
      placeholder="名称"
      :rules="[{ required: true, message: '请填写用户名' }]"
    />
    <van-button round block type="info" style='width:200px' @click='add'>提交</van-button>
  </div>
</template>

<script>
export default {
  name: "cate1",
  data() {
    return {
      name: ''
    }
  },

  methods: {
    add() {
      this.axios.post('cateM', {'name': this.name}).then(res => {

      })
    }
  },

  mounted() {

  }
}
</script>

<style scoped>

</style>